<extend name="Public:base" />
<block name="content">

<div class="row-fluid">

        <div class="span12">

            <!-- BEGIN STYLE CUSTOMIZER -->

            <div class="color-panel hidden-phone">

                <div class="color-mode-icons icon-color"></div>

                <div class="color-mode-icons icon-color-close" style="display: none;"></div>

                <div class="color-mode" style="display: none;">

                    <p>THEME COLOR</p>

                    <ul class="inline">

                        <li class="color-black color-default current" data-style="default"></li>

                        <li class="color-blue" data-style="blue"></li>

                        <li class="color-brown" data-style="brown"></li>

                        <li class="color-purple" data-style="purple"></li>

                        <li class="color-grey" data-style="grey"></li>

                        <li class="color-white color-light" data-style="light"></li>

                    </ul>

                    <label>

                        <span>Layout</span>

                        <select class="layout-option m-wrap small">

                            <option value="fluid" selected="">Fluid</option>

                            <option value="boxed">Boxed</option>

                        </select>

                    </label>

                    <label>

                        <span>Header</span>

                        <select class="header-option m-wrap small">

                            <option value="fixed" selected="">Fixed</option>

                            <option value="default">Default</option>

                        </select>

                    </label>

                    <label>

                        <span>Sidebar</span>

                        <select class="sidebar-option m-wrap small">

                            <option value="fixed">Fixed</option>

                            <option value="default" selected="">Default</option>

                        </select>

                    </label>

                    <label>

                        <span>Footer</span>

                        <select class="footer-option m-wrap small">

                            <option value="fixed">Fixed</option>

                            <option value="default" selected="">Default</option>

                        </select>

                    </label>

                </div>

            </div>

            <!-- END BEGIN STYLE CUSTOMIZER -->  

            <!-- BEGIN PAGE TITLE & BREADCRUMB-->

            <h3 class="page-title">

                Commodity browsing <small class="add">添加商品</small>

            </h3>

            <ul class="breadcrumb">

                <li>

                    <i class="icon-home"></i>

                    <a href="index.html">主页</a> 

                    <i class="icon-angle-right"></i>

                </li>

                <li>

                    <a href="#">商品浏览</a>


                </li>


            </ul>

            <!-- END PAGE TITLE & BREADCRUMB-->

        </div>

    </div>


<div class="portlet box blue">

        <div class="portlet-title">

            <div class="caption"><i class="icon-globe"></i>用户浏览</div>

       

        </div>

        <div class="portlet-body">

            <div id="sample_2_wrapper" class="dataTables_wrapper form-inline" role="grid">
                <div class="row-fluid"><div class="span6">
                    <div id="sample_2_length" class="dataTables_length">
                        <label>
                          <select size="1" name="sel" aria-controls="DataTables_Table_1">
                                <option value="10" selected="selected">10</option>
                                <option value="20">20</option>
                                <option value="30">30</option>
                                <option value="40">40</option>
                                <option value="50">50</option>
                                <option value="60">60</option>
                                <option value="70">70</option>
                                <option value="80">80</option>
                                <option value="90">90</option>
                                <option value="100">100</option>
                            </select> 
                            显示条数
                        </label>
                    </div>
                </div>
                <div class="span6">
                    <div class="dataTables_filter" id="sample_2_filter">
                        <label>搜索: <input name="keyword" type="text" aria-controls="sample_2" class="m-wrap small">
                        </label>
                    </div>
                </div>
            </div>
            <table class="table table-striped table-bordered table-hover table-full-width dataTable" id="sample_2" aria-describedby="sample_2_info" style="width: 976px;">

                <thead>

                    <tr role="row">
                        <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-label="Rendering engine: activate to sort column ascending" style="width: 115px;">
                        ID
                        </th>
                        <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Browser: activate to sort column descending" style="width: 115px;">
                        编号
                        </th>
                        <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending" style="width: 115px;">
                        用户名称
                        </th>
                        <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending" style="width: 115px;">
                        订单地址
                        </th>
                        <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending" style="width: 115px;">
                        收件人电话
                        </th>
                        <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending" style="width: 115px;">
                        订单时间
                        </th>
                        <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending" style="width: 115px;">
                        订单状态
                        </th>
                       <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending" style="width: 115px;">
                        详细信息
                        </th>
                    </tr>

                </thead>

                

            <tbody role="alert" aria-live="polite" aria-relevant="all" id="con">
               
            </tbody>
        </table>
        <div class="row-fluid">
            <div class="span6">
                <div class="dataTables_info" id="sample_2_info">
                    Showing 1 to 15 of 43 entries
                </div>
            </div>
            <div class="span6">
                <div class="dataTables_paginate paging_bootstrap pagination">
                   
                     <div class="dataTables_paginate paging_full_numbers" id="DataTables_Table_1_paginate">
                              <a tabindex="0" href="javascript:void(0);" class="yangshi" id="DataTables_Table_1_first">
                                第一页
                            </a>
                            <a tabindex="0" href="javascript:void(0);" class="yangshi" id="DataTables_Table_1_previous">
                                上一页
                            </a>
                            <span id='limit'>
                                
                            </span>
                               <a tabindex="0" href="javascript:void(0);" class="yangshi" id="DataTables_Table_1_next">下一页</a>
                             <a tabindex="0" href="javascript:void(0);" class="yangshi" id="DataTables_Table_1_last">最后一页</a>
                       
                      
                        
                    </div>
                 </div>
             </div>
         </div>
    </div>

        </div>

    </div>

        <div id="lvjing">
    </div>

    <div class="tishi" id="biaodan">
        <form action="">
        <input type="hidden" name='id'>
            <table width='300px'>
                <tr>
                    <th colspan="2">修改权限</th>
                </tr>
                <tr align="center" style="height:100px;">
                    <td>账号:</td>
                    <td><input type="text" name="user" disabled="disabled" style="width:190px;height:33px;"></td>
                </tr>
                <tr style="" align="center">
                    <td>权限:</td>
                    <td>
                        <select class="large" name="auto" style="width:200px;height:40px;">
                            <option value="1">前台用户</option>
                            <option value="2">一级管理员</option>
                            <option value="3">二级管理员</option>
                            <option value="4">超级管理员</option>
                        </select>
                    </td>
                </tr>
                <tr style="height:100px;" align="center">
                    <td colspan='2'>
                        <input id="tijiao" type="submit" value='确定'>
                    </td>
                </tr>
            </table>
        </form>
    </div>
    <div id='tishi'>
        
    </div>
    <div class="tianjia tian" style="height:600px;width:600px;left:350px;top:50px;">
        <h3 id="name" style="position:absolute;margin-left:125px;">添加商品</h3>
        <div class="portlet-body form">

            <div class="tabbable portlet-tabs">
                 <ul style="position:absolute;left:550px;z-index:200px;top:10px;" class="nav nav-tabs">

                      <li class=""><a href="#portlet_tab3" id="guanbi" data-toggle="tab">X</a></li>

                    

                 </ul>

                 <div class="tab-content">

                      <div class="tab-pane active" id="portlet_tab1">

                        

                           <form action="" if="myform" method="post" id="form" style="left:350px;top:150px" class="form-horizontal">
                               

                                                <div class="demo clearfix" style="width:400px;position:absolute;left:420px;top:-13px;">
                                                    <div class="emot_photo_video">
                                                        <a class="btn" id="btn111" tabindex="1"><i class="icon_emot_photo_video icon_photo"></i><span>上传图片</span></a>
                                                  
                                                    </div>
                                                </div>
                                                <script type="text/javascript" src="__PUBLIC__/plupload/js/jquery.js"></script>
                                                <script type="text/javascript" src="__PUBLIC__/plupload/js/plupload.full.min.js"></script>
                                                <div class="photo_upload_box_outside" id="photo_upload_box_outside" tabindex="2000" style="left:500px">
                                                    <div class="photo_upload_box">
                                                        <a class="photo_upload_close"href="javascript:void(0);"onclick="photo_upload_close()"></a>
                                                        <h1>本地上传</h1>
                                                        <p class="upload_num">共<span id="uploaded_length">0</span>张，还能上传<span id="upload_other">9</span>张</p>
                                                        <ul id="ul_pics" class="ul_pics clearfix" style="z-index:100px;">
                                                            <li id="local_upload"><img src="__PUBLIC__/plupload/images/local_upload.png" id="btn2"/></li>
                                                        </ul>
                                                        <div class="arrow_layer">
                                                            <span class="arrow_top_area" style="left:5px;"><i class="arrow_top_bg"></i><em class="arrow_top"></em></span>
                                                        </div>
                                                    </div>
                                                </div>
                                        
                                <div class="control-group">

                                     <label class="control-label">分类:</label>

                                     <div class="controls">

                                          <select name="tid" class="medium m-wrap" tabindex="1">

                                          </select>

                                     </div>

                                </div>
                                
                               <div class="control-group">

                                     <label class="control-label">品牌:</label>

                                     <div class="controls">

                                          <select name="pinpai" class="medium m-wrap" tabindex="1">

                                          </select>

                                     </div>

                                </div>

                                <div class="control-group">

                                     <label class="control-label">商品名称:</label>

                                     <div class="controls">

                                          <input type="text" xz="xz" name="goods_name" placeholder="请输入商品名称" class="m-wrap medium">

                                          　<span class="help-inline"></span>

                                     </div>

                                </div> 
                                <div class="control-group">

                                     <label class="control-label">商品价格:</label>

                                     <div class="controls">

                                          <input type="text" name="goods_price" xz="xz" placeholder="请输入商品价格" class="m-wrap medium">

                                          　<span class="help-inline"></span>

                                     </div>

                                </div>
                                 <div class="control-group">

                                     <label class="control-label">商品总数:</label>

                                     <div class="controls">

                                          <input type="text" name="goods_stock" xz="xz" placeholder="请输入商品总数" class="m-wrap medium">

                                          　<span class="help-inline"></span>

                                     </div>

                                </div>

                                <div class="control-group">

                                        <label class="control-label">显示位置:</label>

                                        <div class="controls">

                                            <div class="row-fluid">

                                                <div class="span6" style="position:absolute;left:180px;" info="span1">

                                                    


                                                </div>

                                                <div class="span6" style="position:absolute;left:310px;" info="span2">


                                                   

                                                </div>
                                                <span style="position:absolute;left:417px;top:220px;" class="help-inline"></span>

                                            </div>

                                        </div>

                                    </div>


                                 <div class="control-group">

                                     <label class="control-label">商品描述:</label>

                                     <div class="controls">

                                            <textarea name="con" id="" xz="xz" cols="30" rows="6" style="resize:none;"></textarea>
                                          　<span class="help-inline"></span>

                                     </div>

                                </div>

                                
                                 <!--    <input type="submit" class="btn blue" style="margin-left:170px;" value='添加'> -->
                                     <button type="submit" id="tianjia" class="btn blue" style="margin-left:170px;"><i class="icon-ok"></i> 提交</button>
                                     <input type="reset" name="res" class="btn" style="margin-left:80px;" value="重置">
                                
                           </form>

                           <!-- END FORM-->  

                      </div>

                 </div>

            </div>

       </div>
    </div>
    <div class="lunbo">
    <center>
        <div class="control-group" >

            <label class="control-label">上传轮播图</label>

            <div class="controls">

                <div class="fileupload fileupload-new" data-provides="fileupload"><input type="hidden"><input type="hidden" value="" name="">

                    <div class="fileupload-new thumbnail" info="pic" style="width: 200px; height: 73px;">

                        <img id="images" src="" alt="">

                    </div>

                    <div id="dian" class="fileupload-preview fileupload-exists thumbnail" style="max-width: 200px; max-height: 150px; line-height: 20px;"></div>

                    <div>
                            <form action="{:U('admin/goods/goods/lunbo')}" target="zi" method="post" enctype="multipart/form-data">

                        <span class="btn btn-file">

                        <span class="fileupload-exists" style="display:block;">选择图片</span>
                                <input type="file" id="pic" class="default" name="pic"></span>
                                <input type="hidden" name="gid" value="">

                            <button id="queren" class="btn fileupload-exists">确认上传</button>
                        </form>
                        <iframe style="display:none;" src="" frameborder="0" name="zi"></iframe>
                    </div>

                </div>

                <span class="label label-important"></span>

                <span>

               
                </span>

            </div>

        </div>
        </center>
    </div>
    <table info="mytable" class=" table-striped table-bordered table-hover table-full-width dataTable" aria-describedby="sample_2_info" style=" text-align:center;display:none;background:#fff;width=30px;position: fixed;left:300px;top:150px;z-index:200;">

                <thead>

                    <tr role="row">
                        <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-label="Rendering engine: activate to sort column ascending" style="width: 115px;">
                        ID
                        </th>
                        <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Browser: activate to sort column descending" style="width: 115px;">
                        商品名称
                        </th>
                        <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending" style="width: 115px;">
                        商品单价
                        </th>
                        <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending" style="width: 115px;">
                        商品图片
                        </th>
                        <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending" style="width: 115px;">
                        商品数量
                        </th>
                        <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending" style="width: 115px;">
                        商品小计
                        </th>
                       
                    </tr>

                </thead>

                

            <tbody role="alert" aria-live="polite" aria-relevant="all" info="my_tbody">
               
            </tbody>
        </table>
<script type="text/javascript" src="__PUBLIC__/plupload/js/plupload.full.min.js"></script>
<script type="text/javascript">
    
</script>
<style type="text/css">
    .vad { margin: 120px 0 5px; font-family: Consolas,arial,宋体,sans-serif; text-align:center;}
    .vad a { display: inline-block; height: 36px; line-height: 36px; margin: 0 5px; padding: 0 50px; font-size: 14px; text-align:center; color:#eee; text-decoration: none; background-color: #222;}
    .vad a:hover { color: #fff; background-color: #000;}
    .thead { width: 728px; height: 90px; margin: 0 auto; border-bottom: 40px solid #fff;}
</style>

<script>
  
  
    $('#guanbi').click(function(){
        $('#lvjing').css('display','none');
        $('.tianjia').css('display','none');
        $('input[name="res"]').click();
        $('span[info="che"]').attr('class','');
        $('.help-inline').html('');
        $('b[info="tishi"]').html('');
        $('table[info="mytable"]').css('display','none');
    });





    var ilimit = null;
    var mylimit = null;
    var zuidayeshu = null;
    var keyword = null;
    var shenfen = null;
    //通过下拉事件触发ajax  请求每页显示数据条数
    $('select[name="sel"]').change(function(){
        mylimit = $(this).val();
        ilimit=1;
        keyword = $("input[name='keyword']").val();
        myajax(mylimit,ilimit,keyword);
        
    });
    //给页数显示绑定ajax 请求显示的页数
    $("#limit a").live('click',function(){
        mylimit = $('select[name="sel"]').val();
        ilimit = $(this).html();
        keyword = $("input[name='keyword']").val();
        if($(this).attr('class')=='paginate_button'){
            myajax(mylimit,ilimit,keyword);
        }
    });
    //给上一页绑定点击事件,  请求上一页数据
    $("#DataTables_Table_1_previous").click(function(){
        mylimit = $('select[name="sel"]').val();
        ilimit = parseInt($("#limit a[class='paginate_active']").html())-1;
        keyword = $("input[name='keyword']").val();
        if(ilimit<1){
            return false;
        }
        myajax(mylimit,ilimit,keyword);
    });
    //给第一页绑定点击事件,请求第一页数据
    $("#DataTables_Table_1_first").click(function(){
        mylimit = $('select[name="sel"]').val();
        ilimit = 1;
        keyword = $("input[name='keyword']").val();
        if($(this).attr('class')=='first paginate_button paginate_button_disabled'){
            return false;
        }
        myajax(mylimit,ilimit,keyword);
    });
    //给下一页绑定点击事件请求下一页数据
    $("#DataTables_Table_1_next").click(function(){
        mylimit = $('select[name="sel"]').val();
        ilimit = parseInt($("#limit a[class='paginate_active']").html())+1;
        keyword = $("input[name='keyword']").val();
        zuidayeshu = parseInt($("#limit a").last().html());
        if(ilimit>zuidayeshu){
            return false;
        }
        myajax(mylimit,ilimit,keyword);
        
    });
    $("#DataTables_Table_1_last").click(function(){
        mylimit = $('select[name="sel"]').val();
        ilimit = parseInt($('#limit span span').html());
        keyword = $("input[name='keyword']").val();
        if($(this).attr('class')=='previous paginate_button paginate_button_disabled'){
            return false;
        }
        myajax(mylimit,ilimit,keyword);
    });

    $("input[name=keyword]").keyup(function(ent){
        mylimit = $('select[name="sel"]').val();
        ilimit=1;
        keyword=$(this).val();
        myajax(mylimit,ilimit,keyword);
    });
        // mylimit = $('select[name="sel"]').val();
        // ilimit = 1;
        // keyword = $("input[name='keyword']").val();
        $('button[info="chakan"]').live('click',function(){
            $('#lvjing').css('display','block');
            $('table[info="mytable"]').css('display','block');
            var gid = eval($(this).attr('gid'));
            console.log(gid);
            $.ajax({
                url:'/admin/goods/order/cart',
                type:'post',
                data:{'gid':gid},
                dataType:'',
                success:function(mes){
                    // console.log($(mes));
                    $('tbody[info="my_tbody"]').empty();
                    var tr = null;
                    var total = null;
                    $(mes).each(function(){
                         tr = $('<tr class=""><td class=" " info="id">'+$(this).attr('id')+'</td><td class="sorting_1">'+$(this).attr('goods_name')+'</td><td class="hidden-480 ">'+$(this).attr('goods_price')+'</td><td class="hidden-480 " style="text-algin:center;"><img src="'+$(this).attr('pic')+'" style="height:50px;"></td><td class="hidden-480 ">'+$(this).attr('num')+'</td><td class="hidden-480 ">'+$(this).attr('subtotal')+'</td></tr>');
                         $('tbody[info="my_tbody"]').append(tr);
                         total+=parseInt($(this).attr('subtotal'));
                    });
                        var tr1 = $('<tr><td colspan="5" style="text-align:right;">总价:</td><td>'+total+'元</td></tr>');
                        $('tbody[info="my_tbody"]').append(tr1);
                }
            });
            return false;
        });
    $('.sel1').live('change',function(){
        // alert('aaa');
        var id = $(this).attr('oid');
        var sel = $(this);
        $.ajax({
            url:'/admin/goods/order/status',
            type:'post',
            data:{'id':id},
            success:function(mes){
                if(mes=='yes'){
                    sel.attr('disabled',true);
                    sel.append("<option value='2'>已收货</option><option value='5'>用户已删除</option>")
                }else{
                    alert('修改失败,请刷新后重试');
                }
            }
        })
    });
    myajax(10,1,'');
    function myajax(mylimit,ilimit,keyword){
         $.ajax({
            url:'/admin/goods/order/limit',
            data:{'mylimit':mylimit,'ilimit':ilimit,'keyword':keyword},
            type:'get',
            dataType:'json',
            async:false,
            success:function(mes){
                $("#limit").find('a').remove();
                $("#limit a").attr('class','paginate_button');
                $("#limit a:eq("+(ilimit-1)+")").attr('class','paginate_active');
                var num = $(mes).length-1;
                if(parseInt(mes[num])>3){
                    if(parseInt(ilimit)<3){
                        var kaishi = 1;
                        var jieshu = 3;
                    }else{
                        kaishi = parseInt(ilimit)-1;
                        jieshu = parseInt(ilimit)+1;
                    }
                    if(parseInt(ilimit)==mes[num]){
                        kaishi = parseInt(mes[num])-2;
                        jieshu = parseInt(mes[num]);
                    }
                }else{
                    kaishi = 1;
                    jieshu = parseInt(mes[num]);
                }
                var id = document.getElementById('limit');
                for(var i=kaishi;i<=jieshu;i++){
                    var a = document.createElement('a');
                    a.setAttribute('tabindex','0');
                    a.setAttribute('class','paginate_button');
                    if(i==ilimit){
                        a.setAttribute('class','paginate_active');
                    }
                    a.innerHTML=i;
                    id.appendChild(a);
                }
                $("#limit span").remove();
                    var span = document.createElement('span');
                    span.innerHTML='共<span>'+parseInt(mes[num])+'</span>页';
                    id.appendChild(span);
                    var status = null;
                    $("#con tr").remove();
                $(mes).each(function(i){
                    if((num)==i){
                        return true;
                    }
                    console.log($(this).attr('gid'));
                    var tr = null;
                    if(i%2==0){
                         tr = $('<tr class="odd"><td class=" " info="id">'+$(this).attr('id')+'</td><td class="sorting_1">'+$(this).attr('bianhao')+'</td><td class="hidden-480 ">'+$(this).attr('name')+'</td><td class="hidden-480 ">'+$(this).attr('zhuzhi')+'</td><td class="hidden-480 ">'+$(this).attr('phone')+'</td><td class="hidden-480 ">'+$(this).attr('time')+'</td><td class="hidden-480 "><select name="status" oid="'+$(this).attr('id')+'" class="sel1" ><option value="0">新订单</option><option value="1">已发货</option></select></td><td class="hidden-480 "><button info="chakan" type="submit" class="btn blue start" gid='+$(this).attr('gid')+'><i class="icon-upload icon-white"></i><span>点击查看</span></button></td></tr>');
                    }else{
                         tr = $('<tr class="even"><td class=" " info="id">'+$(this).attr('id')+'</td><td class="sorting_1">'+$(this).attr('bianhao')+'</td><td class="hidden-480 ">'+$(this).attr('name')+'</td><td class="hidden-480 ">'+$(this).attr('zhuzhi')+'</td><td class="hidden-480 ">'+$(this).attr('phone')+'</td><td class="hidden-480 ">'+$(this).attr('time')+'</td><td class="hidden-480 "><select name="status" oid="'+$(this).attr('id')+'" class="sel1" ><option value="0">新订单</option><option value="1">已发货</option></select></td><td class="hidden-480 "><button info="chakan" type="submit" class="btn blue start" gid='+$(this).attr('gid')+'><i class="icon-upload icon-white"></i><span>点击查看</span></button></td></tr>');
                    }
                    if(parseInt($(this).attr('status'))>0){
                        tr.find('.sel1').attr('disabled',true);
                        tr.find('.sel1').append("<option value='2'>已收货</option><option value='5'>用户已删除</option>")
                    }
                    tr.find('.sel1').val($(this).attr('status'));
                    $("#con").append(tr);
                });
                

                if(ilimit!=1){
                    $("#DataTables_Table_1_first").attr('class','first paginate_button');
                    $("#DataTables_Table_1_previous").attr('class','previous paginate_button ');
                }else{
                    $("#DataTables_Table_1_first").attr('class','first paginate_button paginate_button_disabled');
                    $("#DataTables_Table_1_previous").attr('class','previous paginate_button paginate_button_disabled ');
                }                                   
                if(ilimit>=mes[num]){
                    $("#DataTables_Table_1_next").attr('class','first paginate_button paginate_button_disabled');
                    $("#DataTables_Table_1_last").attr('class','previous paginate_button paginate_button_disabled');
                }else{
                    $("#DataTables_Table_1_next").attr('class','first paginate_button');
                    $("#DataTables_Table_1_last").attr('class','previous paginate_button ');
                }

            }
        });
        
    }
   

</script>
</block>